package com.stone.business.zbtz.pojo;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.stone.sys.pojo.TDictionary;
import com.stone.sys.service.DictionaryService;

import frm.ssh.util.SpringUtil;

/**
 * 
 * 安全管理风险库,安全备忘录
 * 
 */
@Entity
@Table(name = "TAB_AQGL")
public class TAqgl implements java.io.Serializable {

	private Long id = Long.parseLong("0");
	/**
	 * 变电站
	 */
	private String bdz;
	private String bdzname;	
	private String  dantype;     //安全管理类型  1风险库, 2安全备忘录

	/**
	 * 设备类别
	 */	
	private String sblx;
	private String sblxname;
	/**
	 * 电压等级
	 */	
	private String dydj;
	/**
	 * 设备型号
	 */	
	private String sbxh;
	/**
	 * 设备名称
	 */	
	private String sbmc;
	/**
	 * 作业内容
	 */	
	private String zynr;
	/**
	 * 风险点
	 */	
	private String fxd;
	/**
	 * 控制措施
	 */	
	private String kzcs;
	/**
	 * 备注
	 */	
	private String bz;
	/**
	 * 备忘录
	 */	
	private String bwl;
	/**
	 * 创建人
	 */
	private String cjr;
	
	/**
	 * 创建时间
	 */
	private Date cjsj;
	private Long cjrid;
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_AQGL")
	@SequenceGenerator(name="SEQ_AQGL",allocationSize=1, sequenceName="SEQ_AQGL")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	
	public String getBdz() {
		return bdz;
	}
	public void setBdz(String bdz) {
		this.bdz = bdz;
	}
	public String getBdzname() {
		return bdzname;
	}
	public void setBdzname(String bdzname) {
		this.bdzname = bdzname;
	}
	public String getSblx() {
		return sblx;
	}
	public void setSblx(String sblx) {
		this.sblx = sblx;
	}
	public String getDydj() {
		return dydj;
	}
	public void setDydj(String dydj) {
		this.dydj = dydj;
	}
	public String getSbxh() {
		return sbxh;
	}
	public void setSbxh(String sbxh) {
		this.sbxh = sbxh;
	}
	public String getSbmc() {
		return sbmc;
	}
	public void setSbmc(String sbmc) {
		this.sbmc = sbmc;
	}
	public String getZynr() {
		return zynr;
	}
	public void setZynr(String zynr) {
		this.zynr = zynr;
	}
	public String getFxd() {
		return fxd;
	}
	public void setFxd(String fxd) {
		this.fxd = fxd;
	}
	public String getKzcs() {
		return kzcs;
	}
	public void setKzcs(String kzcs) {
		this.kzcs = kzcs;
	}
	public String getBz() {
		return bz;
	}
	public void setBz(String bz) {
		this.bz = bz;
	}
	public String getBwl() {
		return bwl;
	}
	public void setBwl(String bwl) {
		this.bwl = bwl;
	}
	public String getDantype() {
		return dantype;
	}
	public void setDantype(String dantype) {
		this.dantype = dantype;
	}
	@Transient
	public String getSblxname() {
		DictionaryService dicService = (DictionaryService) SpringUtil.getInstance().getBean("dicService");
		//设备类型
		List<TDictionary> sblxList = dicService.findList("SBLX");
		for (int i = 0; i < sblxList.size(); i++) {
			TDictionary dic=sblxList.get(i);
			if(dic.getItemId().equals(this.sblx)){
				this.sblxname=dic.getItemName();
			}
		}
		return sblxname;
	}
	public void setSblxname(String sblxname) {
		this.sblxname = sblxname;
	}
	public String getCjr() {
		return cjr;
	}
	public void setCjr(String cjr) {
		this.cjr = cjr;
	}
	public Date getCjsj() {
		return cjsj;
	}
	public void setCjsj(Date cjsj) {
		this.cjsj = cjsj;
	}
	public Long getCjrid() {
		return cjrid;
	}
	public void setCjrid(Long cjrid) {
		this.cjrid = cjrid;
	}
	
	
	

}